import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)
const routes = [
  {path:"/",redirect:"/index"},
  {path:"/index",name:"index",component:()=>import("@/views/index/index.vue")},
  // {path:"/aboutus",name:"aboutus",component:()=>import("@/views/aboutus/aboutus.vue")},
  // {
  //   path:"/news",
  //   name:"news",
  //   redirect:"/news/gsdt",
  //   component:()=>import("@/views/news/news.vue"),
  //   children:[
  //     {path:"gsdt",name:"gsdt",component:()=>import("@/views/news/gsdt.vue")},
  //     {path:"yszx",name:"yszx",component:()=>import("@/views/news/yszx.vue")},
  //     {path:"hyfx",name:"hyfx",component:()=>import("@/views/news/hyfx.vue")},
  //     {path:"zcjd",name:"zcjd",component:()=>import("@/views/news/zcjd.vue")},
  //   ]
  // },
  // {path:"/movielist",name:"movielist",component:()=>import("@/views/movie/movielist.vue")},
  // {path:"/moviedetail",name:"moviedetail",component:()=>import("@/views/movie/moviedetail.vue")},
  // {path:"/newsdetail",name:"newsdetail",component:()=>import("@/views/news/newsdetail.vue")},
  // {path:"/gyhd",name:"gyhd",component:()=>import("@/views/gyhd/gyhd.vue")},
  // {path:"/connectus",name:"connectus",component:()=>import("@/views/connectus/connectus.vue")},
  {path:"*",redirect:{name:"index"}}
]


const VueRouterPush = VueRouter.prototype.push
VueRouter.prototype.push = function push (to) {
  return VueRouterPush.call(this, to).catch(err => err)
}


const router = new VueRouter({
  mode: 'hash',
  routes
})

export default router
